package com.matt.repository.api;

import com.matt.domain.api.HlThermometerDevice;
import com.matt.domain.article.Article;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * *******************************
 * Created by Ron.
 * form com.matt
 * on 2018/11/22
 * *******************************
 */
public interface HIThermometerDeviceRepository extends JpaRepository<HlThermometerDevice, String>,JpaSpecificationExecutor<HlThermometerDevice>{

	@Query(value = "select hl.areaId from hl_thermometer_device hl where hl.id= ?1  limit 1", nativeQuery = true)
	String findAreaIdById(String id);

	@Query(value = "select hl.* from hl_thermometer_device hl where hl.id= ?1  limit 1", nativeQuery = true)
	HlThermometerDevice findAreaIdById1(String id);
}
